﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using jiaju.Models;
using jiaju.Models.DBModel;

namespace jiaju.Models.DAL
{
    public class DesignerService
    {
        //设计团队
        public static List<Designer> getDesigner()
        {
            string sql = "select ImgUrl,Name,Position from dbo.designer";
            List<Designer> list = new List<Designer>();
            SqlDataReader sdr = DBHelp.ExecuteReader(sql);
            while (sdr.Read())
            {
                string ImgUrl = (string)sdr["ImgUrl"];
                string Name = (string)sdr["Name"];
                string Position = (string)sdr["Position"];
                Designer designer = new Designer()
                {
                    ImgUrl = ImgUrl,
                    Name = Name,
                    Position = Position
                };
                list.Add(designer);
            }
            return list;
        }
    }
}